import request from '@/utils/request'

// 查询车间流水线列表
export function listLine(query) {
  return request({
    url: '/mes/workshop/line/list',
    method: 'get',
    params: query
  })
}

// 查询车间流水线详细
export function getLine(workshop_code) {
  return request({
    url: '/mes/workshop/line/' + workshop_code,
    method: 'get'
  })
}

// 新增车间流水线
export function addLine(data) {
  return request({
    url: '/mes/workshop/line',
    method: 'post',
    data: data
  })
}

// 修改车间流水线
export function updateLine(data) {
  return request({
    url: '/mes/workshop/line',
    method: 'put',
    data: data
  })
}

// 删除车间流水线
export function delLine(workshop_code) {
  return request({
    url: '/mes/workshop/line/' + workshop_code,
    method: 'delete'
  })
}
